package com.test.pattern.strategy;

/**
 * @ClassName: SalesMan
 * @description: 上下文类(促销员)
 * @author: Mr du
 * @create: 2024-02-28 22:45
 */
public class SalesMan {

    //聚合父类
    private Strategy strategy;

    public SalesMan(Strategy strategy) {
        this.strategy = strategy;
    }

    public Strategy getStrategy() {
        return strategy;
    }

    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }

    //向客户展示促销活动
    public void salesManShow(){
        strategy.show();
    }
}
